package polymorphicTask.perimeterAndArea;

public class Circle extends Diagram {
    private int radius;

    public int getRadius() {
        return radius;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }
    public void perimeter(){
        System.out.println("圆的周长为："+(Math.PI*2*radius));
    }
    public void area(){
        System.out.println("圆的面积为："+(Math.PI*radius*radius));
    }
    public Circle(){}

    public Circle(int radius){
        this.radius=radius;
    }
}
